<div ng-controller="z-hrBusinessTripApproval-c" z-loading is-loading="viewModel.isLoading">
	<div viewstack class="carousel slide" data-ride="carousel">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
	                       <li>
		                        <i class="im-home"></i>
		                        <a href="index.html">首页</a>
	                        </li>
	                        <li ng-repeat="menu in viewModel.menuList">
	                        	<i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
	                        	<i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
	                        	{{menu.label}}
	                        </li>
                        </ul>
                    </div>
                </div>
                <div class="outlet">
	                <div class="panel-body">
	                    <form class="form-horizontal group-border hover-stripped" role="form" name="form">
	                        <div class="row">
	                           <div class="col-xs-12 col-sm-10 col-md-11 form-box">
	                             <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">公司：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" style="width:272%;">
												<select id="hrBCorporation" multiple="multiple" class="form-control" ng-model="viewModel.corporationList" tabIndex="1">
				                                </select>	   
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">部门：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<!-- <input name="department" 
													   ng-model="viewModel.departmentName" 
													   type="text" 
													   placeholder="部门编码、部门名称" 
													   maxLength="60"
													   class="form-control"
													   tabIndex="2"> -->
												<select id="hrBDepartmentName" multiple="multiple" class="form-control" ng-model="viewModel.departmentList" tabIndex="2">
				                                </select>	 
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">员工：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<!-- <input name="employeeNo" 
													   ng-model="viewModel.employeeNo" 
													   type="text" 
													   placeholder="员工号、中文名称、英文名称"
													   maxLength="45"
													   class="form-control"
													   tabIndex="3" > -->
												<textarea ng-model="viewModel.employeeNo" placeholder="员工号、中文名称、英文名称" class="form-control elastic __web-inspector-hide-shortcut__" rows="1"></textarea>
											</div>
										</div>
										<!-- <div class="col-sm-2 col-md-2 form-input">
											<div class="input-group">
												<button type="button" class="btn btn-success" tabIndex="7">批量</button>	 
											</div>	  
										</div> -->
									</div>
	                            </div>
	                            <div class="col-xs-12 col-sm-10 col-md-11 form-box">
	                                <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">员工级别：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
				                                <select id="hrBlevel" multiple="multiple" class="form-control" ng-model="viewModel.employeeLevelList" tabIndex="4">
				                                    <option value="13">13</option>
				                                    <option value="14">14</option>
				                                    <option value="15">15</option>
				                                    <option value="16">16</option>
				                                    <option value="17">17</option>
				                                    <option value="18">18</option>
				                                    <option value="19">19</option>
				                                    <option value="20">20</option>
				                                    <option value="21">21</option>
				                                    <option value="22">22</option>
				                                    <option value="23">23</option>
				                                    <option value="24">24</option>
				                                    <option value="25">25</option>
				                                    <option value="26">26</option>
				                                    <option value="27">27</option>
				                                    <option value="28">28</option>
				                                    <option value="29">29</option>
				                                    <option value="30">30</option>
				                                </select>
											</div>
										</div>
									</div>
	                             <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">审批状态：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.approvalState.$invalid && !form.approvalState.$pristine }">
												<select id="approvalState" class="form-control" ng-model="viewModel.approvalState">
	                                    <option value=""></option>
	                                    <option ng-repeat="dictionary in viewModel.approvalStateList" value="{{dictionary.dicCd}}">{{dictionary.dicName}}</option>
	                                            </select>
											</div>
										</div>
								 </div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">开始日期：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
										<input name="retroactiveStratDate" 
											   ng-model="viewModel.retroactiveStratDate" 
											   class="form-control datetime-picker" 
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   is-open="viewModel.startDateOpened"
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close"
										       required
										       readonly>
										<span class="input-group-addon cursorPointer" ng-click="viewModel.startDateOpen($event)"><i class="fa-calendar"></i></span>
									</div>
										</div>
								 </div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">至：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
										           <input 
											   name="retroactiveEndDate" 
											   ng-model="viewModel.retroactiveEndDate" 
											   class="form-control datetime-picker" 
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   is-open="viewModel.endDateOpened" 
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close"
										       required
										       readonly>
										          <span class="input-group-addon cursorPointer" ng-click="viewModel.endDateOpen($event)"><i class="fa-calendar"></i></span>
									         </div>
										</div>
								 </div>
	                            </div>
	                            <div class="col-xs-12 col-sm-10 col-md-11 form-box">
	                              <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">申请天数：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
										           <input 
											   name="requestStartDayNumber" 
											   ng-model="viewModel.requestStartDayNumber" 
											   class="form-control datetime-picker" 
											   type="number"
											   maxLength="10"
										       required>
									         </div>
										</div>
								 </div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">至：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
										           <input 
											   name="requestEndDayNumber" 
											   ng-model="viewModel.requestEndDayNumber" 
											   class="form-control datetime-picker" 
											   type="number"
											   maxLength="10"
										       required>
									         </div>
										</div>
								 </div>
								 <!-- 检索按钮 -->
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-7 col-md-7 form-input-left">
											<button type="button" class="btn btn-success" ng-click="viewModel.bindData()">搜索</button>
										</div>
								 </div>
	                            </div>
	                        </div>
	                    </form>
	                </div>
                </div>
                <div class="outlet outbon">
					<button class="btn btn-success" ng-click="viewModel.add()">驳回</button>
                </div>
				<div class="container-fluid">
					<div class="row">
						<table class="table table-striped table-bordered" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th width="80px"><input type="checkbox" ng-model="viewModel.checkAll" ng-click="viewModel.checkboxAll()"><b>全选</b></th>
									<th width="7%">员工号</th>
									<th width="7%">中文名称</th>
									<th width="7%">英文名称</th>
									<th>开始日期</th>
									<th>结束日期</th>
									<th>时长(天/小时)</th>
									<th width="6%">申请类型</th>
									<th width="6%">审核状态</th>
									<th width="13%">申请日期</th>
									<th width="20%">申请说明</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="hrRequestApproval in viewModel.dataList">
									<td>
			                            <input type="checkbox"
			                                   ng-if="hrRequestApproval.approvalState != 3 && hrRequestApproval.isClosed == 0" 
			                            	   ng-model="hrRequestApproval.checkbox" 
			                            	   ng-click="viewModel.checkbox(hrRequestApproval)">
			                        </td>
			                        <td>{{hrRequestApproval.employeeNo}}</td>
			                        <td>{{hrRequestApproval.chineseName}}</td>
			                        <td>{{hrRequestApproval.englishName}}</td>
			                        <td>
			                        	{{hrRequestApproval.startDate | date:'yyyy/MM/dd'}}<br>
			                        	{{hrRequestApproval.startTime}}
			                        </td>
			                        <td>
			                        	{{hrRequestApproval.endDate | date:'yyyy/MM/dd'}}<br>
			                        	{{hrRequestApproval.endTime}}
			                        </td>
			                        <td>
			                        	<span ng-if="hrRequestApproval.hours==null && hrRequestApproval.requestType!=12">
			                        				{{hrRequestApproval.dayNumber}}
			                        		天
			                        	</span>
			                        	<span ng-if="hrRequestApproval.requestType==12">
			                        		半天
			                        	</span>
			                        	<span ng-if="hrRequestApproval.hours!=null && hrRequestApproval.requestType!=12">
			                        				{{viewModel.toHourMinute(hrRequestApproval.hours)}}
			                        	</span>
			                        </td>
									<td>{{hrRequestApproval.requestTypeName}}</td>
									<td>
										<a ng-click="viewModel.selecttApprovalRecord(hrRequestApproval)"
										   ng-if="hrRequestApproval.approvalState!=0">{{hrRequestApproval.approvalStateName}}</a>
										<span ng-if="hrRequestApproval.approvalState==0">{{hrRequestApproval.approvalStateName}}</span>   
									</td>
									<td>{{hrRequestApproval.requestDate | date:'yyyy/MM/dd HH:mm:ss'}}</td>
									<td>{{hrRequestApproval.description}}</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="row">
						<div z-Pagination total-Data='viewModel.totalData'
							per-Page='viewModel.perPage'
							current-Page='viewModel.rowCount'
							on-Click="viewModel.bindData()"
							on-Change-Per-Page="viewModel.bindData()"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<z-Dialog show-Save-Btn="true" 
	have-Error-Class="viewModel.checkGlobal()" 
	load-Url="static/html/hrBusinessTripApproval/hrBusinessTripApprovalEdit.html" 
	title="{{editModel.title}}" 
	show="viewModel.show"
	cancel-fn="viewModel.unLoad()"
	save-fn="viewModel.save()"
	body-Height="165"></z-Dialog>
	<z-Dialog show-Save-Btn="false" show-Submit-Btn="false" 
	have-Error-Class="true" 
	load-Url="static/html/hrBusinessTripApproval/selectApprovalRecord.html" 
	title="{{viewApprovalRecordModel.title}}" 
	show="viewApprovalRecordModel.show"
	cancel-fn="viewApprovalRecordModel.unLoad()"
	body-Height="465" style="overflow-y:scroll"></z-Dialog>
</div>